package com.pd;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.core.Queue;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;



@SpringBootApplication
@MapperScan("com.pd.mapper")
public class RunPdAPP{
	
	public static void main(String[] args) {
		SpringApplication.run(RunPdAPP.class, args);
	}
	/*
	使用spring提供的Queue对象 封装队列参数:"orderQueue",false,false,false
	Rabbitmq的自动配置类 RabbitAutoConfiguration中,
	会自动发现Queue实例,并连接Rabbitmq服务器 完成队列创建
	 */
	@Bean
	public Queue orderQueue(){
		return new Queue("orderQueue",false);//
	}
}
